package com.cek.tdrive.travel;

import com.cek.tdrive.R;
import com.cek.tdrive.base.TDriveBaseActivity;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class WeatherActivity extends TDriveBaseActivity implements OnClickListener {
	
	private Button showweather;
	private Context ctx;
	private EditText place;
@Override
protected void onCreate(Bundle savedInstanceState) {
	// TODO Auto-generated method stub
	super.onCreate(savedInstanceState);
	setContentView(R.layout.weather);
	showweather=(Button)findViewById(R.id.button1);
	place=(EditText)findViewById(R.id.editText1);
	ctx=this;
	showweather.setOnClickListener(this);
}
	
	public void onClick(View v) {
		int id = v.getId();
		if (id == R.id.button1) {
			Intent i = new Intent(ctx,WeatherDisplay.class);
			String placeStr = place.getEditableText().toString();
			i.putExtra("PLACE", placeStr);

			startActivity(i);
		}	
}
@Override
public void onBackPressed() {
	// TODO Auto-generated method stub
	finish();
}

}
